﻿<d3:ContentGraph x:Class="Microsoft.Research.DynamicDataDisplay.Charts.Navigation.CursorCoordinateGraph"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:d3="clr-namespace:Microsoft.Research.DynamicDataDisplay.Charts"
		xmlns:d3nav="clr-namespace:Microsoft.Research.DynamicDataDisplay.Charts.Navigation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		IsHitTestVisible="False">
	
	<d3:ContentGraph.Resources>
		<Style x:Key="outerBorderStyle" TargetType="{x:Type Rectangle}" >
			<Setter Property="RadiusX" Value="10"/>
			<Setter Property="RadiusY" Value="10"/>
			<Setter Property="Stroke" Value="LightGray"/>
			<Setter Property="StrokeThickness" Value="1"/>
			<Setter Property="Fill" Value="#88FFFFFF"/>
		</Style>

		<Style x:Key="innerBorderStyle" TargetType="{x:Type Border}">
			<Setter Property="CornerRadius" Value="4"/>
			<Setter Property="Background" Value="White"/>
			<Setter Property="Margin" Value="8,4,8,4"/>
		</Style>

		<Style x:Key="textStyle" TargetType="{x:Type TextBlock}">
			<Setter Property="Margin" Value="2,1,2,1"/>
		</Style>
		
		<Style x:Key="lineStyle" TargetType="{x:Type Line}">
			<Setter Property="Stroke" Value="{Binding 
				RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type d3nav:CursorCoordinateGraph}},
				Path=LineStroke}"/>
			<Setter Property="StrokeThickness" Value="{Binding 
				RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type d3nav:CursorCoordinateGraph}},
				Path=LineStrokeThickness}"/>
			<Setter Property="StrokeDashArray" Value="{Binding 
				RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type d3nav:CursorCoordinateGraph}},
				Path=LineStrokeDashArray}"/>
		</Style>
	</d3:ContentGraph.Resources>

	<Canvas Name="content" Cursor="None" Background="Transparent">
		<Line Name="horizLine" Style="{StaticResource lineStyle}"/>
		<Line Name="vertLine" Style="{StaticResource lineStyle}"/>

		<Grid Name="horizGrid" Canvas.Bottom="5">
			<Rectangle Style="{StaticResource outerBorderStyle}"/>
			<Border Style="{StaticResource innerBorderStyle}">
				<TextBlock Name="horizTextBlock" Style="{StaticResource textStyle}"/>
			</Border>
		</Grid>

		<Grid Name="vertGrid" Canvas.Left="5">
			<Rectangle Style="{StaticResource outerBorderStyle}"/>
			<Border Style="{StaticResource innerBorderStyle}">
				<TextBlock Name="vertTextBlock" Style="{StaticResource textStyle}"/>
			</Border>
		</Grid>
	</Canvas>
</d3:ContentGraph>
